package com.bwie.patient.service.impl;

import com.bwie.common.core.domain.Result;
import com.bwie.patient.domain.po.MedBodyParts;
import com.bwie.patient.domain.vo.MedBodyPartsVo;
import com.bwie.patient.mapper.MedBodyPartsMapper;
import com.bwie.patient.service.MedBodyPartsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MedBodyPartsServiceImpl implements MedBodyPartsService {

    @Autowired
    private MedBodyPartsMapper medBodyPartsMapper;

    /**
     * 展示身体部分
     * @return
     */
    @Override
    public Result queryAllBodyParts() {
        List<MedBodyParts> medBodyParts = medBodyPartsMapper.queryAllBodyParts();
        return Result.success(medBodyParts);
    }

    /**
     * 根据身体部分 查询症状
     */
    @Override
    public Result querySymptomByBodyParts(Long id) {
        List<MedBodyPartsVo> medBodyPartsVos = medBodyPartsMapper.querySymptomByBodyParts(id);
        return Result.success(medBodyPartsVos);
    }



}
